<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript">
			function validate(){
				if(loginForm.loginName.value == ""){
					alert("用户名不能为空");
					return false;
				}
				if(loginForm.password.value == ""){
					alert("密码不能为空");
					return false;
				}
			}
		</script>
	</head>
	<body>
		<center>
			<form name="loginForm" action="userAction!login.action" method="post" onsubmit="return validate()">
				<table>
					<tr>
						<th colspan="2">${result }</th>
					</tr>
					<tr>
						<th colspan="2">用户登录</th>
					</tr>
					<tr>
						<td>用户名：</td>
						<td><input type="text" name="user.loginName"></td>
					</tr>
					<tr>
						<td>密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
						<td><input type="password" name="user.password"></td>
					</tr>
				</table>
				<input type="submit" name="submit" value="登录">
    			<input type="reset" name="reset" value="重置">
			</form>
		</center>
	</body>
</html>